/**
 * 
 */
package ar.com.sebasoft.prestalibro.model;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * @author SebaSOFT
 * 
 */
@DatabaseTable(tableName = "socios")
public class Socio {

	@DatabaseField(generatedId = true, dataType = DataType.INTEGER)
	private int id = -1;

	@DatabaseField(canBeNull = false, dataType = DataType.STRING)
	private String email = null;

	@DatabaseField(canBeNull = false, dataType = DataType.STRING)
	private String clave = null;

	@DatabaseField(canBeNull = false, dataType = DataType.STRING)
	private String nombre = null;

	@DatabaseField(canBeNull = false, dataType = DataType.BOOLEAN)
	private boolean admin = false;

	public Socio() {
		// ORMLite needs this
	}

	/**
	 * @param email
	 * @param clave
	 * @param nombre
	 * @param admin
	 */
	public Socio(String email, String clave, String nombre, boolean admin) {
		this.email = email;
		this.clave = clave;
		this.nombre = nombre;
		this.admin = admin;
	}

	/**
	 * @return the id
	 */
	public final int getId() {
		return this.id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public final void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the email
	 */
	public final String getEmail() {
		return this.email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public final void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the clave
	 */
	public final String getClave() {
		return this.clave;
	}

	/**
	 * @param clave
	 *            the clave to set
	 */
	public final void setClave(String clave) {
		this.clave = clave;
	}

	/**
	 * @return the nombre
	 */
	public final String getNombre() {
		return this.nombre;
	}

	/**
	 * @param nombre
	 *            the nombre to set
	 */
	public final void setNombre(String nombre) {
		this.nombre = nombre;
	}

	/**
	 * @return the admin
	 */
	public final boolean isAdmin() {
		return this.admin;
	}

	/**
	 * @param admin
	 *            the admin to set
	 */
	public final void setAdmin(boolean admin) {
		this.admin = admin;
	}
}
